
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Cspell spell checking &#8212; Universal Ctags 0.3.0 documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '0.3.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="Extending ctags" href="extending.html" />
    <link rel="prev" title="Tinst installation test" href="tinst.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="extending.html" title="Extending ctags"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="tinst.html" title="Tinst installation test"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Universal Ctags 0.3.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="testing.html" accesskey="U">Testing ctags</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="cspell-spell-checking">
<span id="cspell"></span><h1><em>Cspell</em> spell checking<a class="headerlink" href="#cspell-spell-checking" title="Permalink to this headline">¶</a></h1>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Maintainer:</th><td class="field-body">Masatake YAMATO &lt;<a class="reference external" href="mailto:yamato&#37;&#52;&#48;redhat&#46;com">yamato<span>&#64;</span>redhat<span>&#46;</span>com</a>&gt;</td>
</tr>
</tbody>
</table>
<hr class="docutils" />
<ul class="simple">
<li><code class="docutils literal"><span class="pre">make</span> <span class="pre">cspell</span></code> reports unknown words.
After verifying the reported words are correct you should
add them to files under <em>dictfiles</em> directory.</li>
<li><code class="docutils literal"><span class="pre">cspell</span></code> target assumes the names used in ctags source code are
correctly spelled. Such names can be added semi-automatically; use
<code class="docutils literal"><span class="pre">make</span> <span class="pre">dicts</span></code> targets. It updates files prefixed with <em>GENERATED-</em>
under <em>dictfiles</em>.</li>
<li>Either semi-automatically generated or adding by manually, files
under <em>dictfiles</em> directory should be installed to Universal-ctags
git repository.</li>
<li><code class="docutils literal"><span class="pre">make</span> <span class="pre">cspell</span></code> makes and users <em>SPELL_CHECKING.TMP</em> at the top of source
code directory as temporary working space.</li>
<li><code class="docutils literal"><span class="pre">cspell</span></code> target depends on GNU aspell library. If the library is linked
to, <code class="docutils literal"><span class="pre">ctags</span> <span class="pre">--list-features</span></code> prints <code class="docutils literal"><span class="pre">aspell</span></code>.</li>
</ul>
<p>An example session:</p>
<div class="highlight-console"><div class="highlight"><pre><span></span><span class="gp">$</span> make cspell
<span class="go">./misc/gen-repoinfo &gt; main/repoinfo.h</span>
<span class="go">  CC       main/ctags-repoinfo.o</span>
<span class="go">  CCLD     ctags</span>
<span class="go">/bin/sh misc/cspell</span>
<span class="go">checking bda36b226cfc0f492908bc5779268c353e615623...unknown words</span>
<span class="go">        orignal</span>
<span class="go">        dictfile</span>
<span class="go">checking 61a71ef37df9fd9ebb0d3e8a941effd643662cda...ok</span>
<span class="go">checking b08c956e155d47a8e689cfede2501ab48890c889...ok</span>
<span class="go">checking c07a6e94140e1d5cfeaf3cb42d2fc28bd0e92e51...ok</span>
<span class="go">...</span>
<span class="go">checking 201e5e774fef84527802113969998bd71b14466d...ok</span>
<span class="go">Makefile:6510: recipe for target &#39;cspell&#39; failed</span>
<span class="go">make: *** [cspell] Error 1</span>
</pre></div>
</div>
<p>Here cspell reports “orignal” and “dictfile” as unknown words.</p>
<p>“orignal” should be “original”. So you should make a fixup commit
for bda36b with “git commit –fixup=bda36b”. Then you may want to
do “git rebase -i –autosquash master”.</p>
<p>“dictfile” may be a name used in source code files. Ideally
<code class="docutils literal"><span class="pre">make</span> <span class="pre">dicts</span></code> picks up the name and puts to one of <em>GENERATED-</em>
dictionaries. However, it is not implemented yet. What you can
do now is adding it to one of dictionaries under <em>dictfiles</em>
directory. After do “git add” the directory file and make
a fixup commit.</p>
<p>There are cases that you want to add a misspelled word intentionally
to source tree: to test cases(Units and Tmain) and to documentations.</p>
<p>About test cases, make a file named <em>dictfile</em> under the directory of
target test case, and put the words line by line. You can find an
example in <em>Units/simple-ctags-aspell.d/dictfile</em> of Universal-ctags
source tree.</p>
<p>For documentations, there is no good way. Suggestions are welcome.
“CSPELL:” prefix line is a temporary solution.  A line starting from
“CSPELL:” in a commit log is treated specially by <code class="docutils literal"><span class="pre">make</span> <span class="pre">cspell</span></code> when
spell-checking the commit; whitespace separated words in the line are
added to a temporary dictionary.</p>
<p>An example</p>
<div class="highlight-git-commit"><div class="highlight"><pre><span></span>commit 8efb57fa1c9d7b9b7ba01f49963d7d7779609f21
Author: Masatake YAMATO &lt;yamato@redhat.com&gt;
Date:   Mon Jun 5 23:08:51 2017 +0900

docs(man): fix styles of definition list

CSPELL: xno xyes

Signed-off-by: Masatake YAMATO &lt;yamato@redhat.com&gt;
</pre></div>
</div>
<p>Here “xno” and “xyes” are added to a dictionary temporary used during
spell-checking the commit, “8efb57”; “xno” and “xyes” are never
reported as unknown words. The temporary dictionary is used only for
this commit.</p>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="tinst.html"
                        title="previous chapter"><em>Tinst</em> installation test</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="extending.html"
                        title="next chapter">Extending ctags</a></p>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="extending.html" title="Extending ctags"
             >next</a> |</li>
        <li class="right" >
          <a href="tinst.html" title="Tinst installation test"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Universal Ctags 0.3.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="testing.html" >Testing ctags</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2015, Universal Ctags Team.
      Last updated on 19 Dec 2017.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4.
    </div>
  </body>
</html>